package jehc.cloud.common.base;

import jehc.cloud.common.constant.StatusConstant;
import jehc.cloud.common.util.logger.LogUtil;
/**
 * @Desc BaseResult
 * @Author 邓纯杰
 * @CreateTime 2012-12-12 12:12:12
 */
public class BaseResult<T> extends LogUtil {
    private int status = StatusConstant.XT_PT_STATUS_VAL_200;
    private String message ="操作成功";
    private Boolean success = true;
    private Object data;
    private T obj;
    /**
     * constructs a successful result
     */
    public BaseResult () {
        success = true;
    }

    public BaseResult(Object data){
        this.success = true;
        this.data = data;
    }
    public  BaseResult(String message,Boolean success){
        this.message = message;
        this.success = success;
    }
    public  BaseResult(String message,Boolean success,Object data){
        this.message = message;
        this.success = success;
        this.data = data;
    }
    public  BaseResult(int status,String message,Boolean success){
        this.status = status;
        this.message = message;
        this.success = success;
    }

    public  BaseResult(int status,String message,Boolean success,Object data){
        this.status = status;
        this.message = message;
        this.success = success;
        this.data = data;
    }
    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Boolean getSuccess() {
        return success;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public T getObj() {
        return obj;
    }

    public void setObj(T obj) {
        this.obj = obj;
    }
}
